import os
import struct
xin = open('weihu.tar.gz', 'rb')
xout = open('weihu2','wb')
ch = xin.read(1)
while(len(ch)!=0):
	ch = ord(ch)^1
	outhex = struct.pack('B', ch)
	xout.write(outhex)
	ch = xin.read(1)
xin.close()
xout.close()
